package org.wk.account.enums;



/**
 * @ClassName	: YuanChangeType
 * @Package		：org.wk.digiccy.enums
 * @Author df.w 
 * @Create Time	：2018年5月9日 下午5:43:55
 * @Description	: 鲸源变动类型
 */ 
public enum YuanChangeType {
	PRESENT_OTHER("present_other","鲸仔转增赠送"),
	FROM_ZAI("from_zai","鲸仔兑换"),
	FROM_ZHONG("from_zhong","鲸种兑换"),
	VIP_ACTIVATE("vip_activate","VIP激活赠送"),
	TO_ZAI("to_zai","释放成鲸仔"),
	ACTIVATE_ONESELF("activate_oneself","自己激活鲸种"),
	OTHERS_ACTIVATE("others_activate","他人激活鲸种");
	private String code;
	private String name;
	private YuanChangeType(String code, String name) {
		this.code = code;
		this.name = name;
	}
	
	
	public static YuanChangeType containsCode(String code) {
		for (YuanChangeType item : YuanChangeType.values()) {
			if (item.getCode().equals(code)) {
				return item;
			}
		}		
		return null;
	}
			
	/**
	 * @return the code
	 */
	
	public String getCode() {
		return code;
	}
	
	/**
	 * @param code 要设置的 code
	 */
	
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * @return the name
	 */
	
	public String getName() {
		return name;
	}
	
	/**
	 * @param name 要设置的 name
	 */
	
	public void setName(String name) {
		this.name = name;
	}
	
}
